import request from '@/utils/request'

// 查询招生名额列表
export function listSpot(query) {
  return request({
    url: '/mentor/spot/list',
    method: 'get',
    params: query
  })
}

// 查询招生名额详细
export function getSpot(id) {
  return request({
    url: '/mentor/spot/' + id,
    method: 'get'
  })
}

// 新增招生名额
export function addSpot(data) {
  return request({
    url: '/mentor/spot',
    method: 'post',
    data: data
  })
}

// 修改招生名额
export function updateSpot(data) {
  return request({
    url: '/mentor/spot',
    method: 'put',
    data: data
  })
}

// 删除招生名额
export function delSpot(id) {
  return request({
    url: '/mentor/spot/' + id,
    method: 'delete'
  })
}

// 导出招生名额
export function exportSpot(query) {
  return request({
    url: '/mentor/spot/export',
    method: 'get',
    params: query
  })
}

// 导出招生名额
export function examineSpot(spotId,status) {
  return request({
    url: '/mentor/spot/examine',
    method: 'post',
    params: {spotId,status}
  })
}
